package org.imaginedays.androidall.ui;

import org.imaginedays.androidall.R;
import org.imaginedays.androidall.constants.Constants;
import org.imaginedays.androidall.service.DownloadService;

import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.content.Intent;
import android.os.Bundle;
import android.os.HandlerThread;
import android.widget.ProgressBar;
import android.widget.TextView;

/**
 * 
 * @author imaginedays
 * 
 */
public class NotifyDownloadProgressACT extends Activity {

	private static final String TAG = NotifyDownloadProgressACT.class
			.getCanonicalName();
	private ProgressBar pb_download_progress;
	private TextView tv_download_progress;
	private NotificationManager nmgr;
	private Notification notif;
	private HandlerThread mNotifyHandlerThread;
	private int notifyId = 8989;
	private int progress = 0;
	private String NOTIFY_THREAD = "Notify_thread";
	public static final int NOTIFY_STATUE = 0;
	private String DOWNLOAD_APK_NOTIFICATION = "download.action.notify";

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.notify_download_progress);

		pb_download_progress = (ProgressBar) findViewById(R.id.pb_download_progress);
		tv_download_progress = (TextView) findViewById(R.id.tv_download_progress_show);

		Intent intent = new Intent(this, DownloadService.class);
		intent.putExtra("path", Constants.DOWNLOAD_PATH);
		intent.setAction(Constants.DOWNLOAD_APK_NOTIFICATION);
		startService(intent);

	}

}
